package com.ruoyi.grape.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.grape.mapper.GrapePhenMapper;
import com.ruoyi.grape.domain.GrapePhen;
import com.ruoyi.grape.service.IGrapePhenService;

/**
 * 物候期信息Service业务层处理
 * 
 * @author ld
 * @date 2023-11-18
 */
@Service
public class GrapePhenServiceImpl implements IGrapePhenService 
{
    @Autowired
    private GrapePhenMapper grapePhenMapper;

    /**
     * 查询物候期信息
     * 
     * @param phenId 物候期信息主键
     * @return 物候期信息
     */
    @Override
    public GrapePhen selectGrapePhenByPhenId(Long phenId)
    {
        return grapePhenMapper.selectGrapePhenByPhenId(phenId);
    }

    /**
     * 查询物候期信息列表
     * 
     * @param grapePhen 物候期信息
     * @return 物候期信息
     */
    @Override
    public List<GrapePhen> selectGrapePhenList(GrapePhen grapePhen)
    {
        return grapePhenMapper.selectGrapePhenList(grapePhen);
    }

    /**
     * 新增物候期信息
     * 
     * @param grapePhen 物候期信息
     * @return 结果
     */
    @Override
    public int insertGrapePhen(GrapePhen grapePhen)
    {
        return grapePhenMapper.insertGrapePhen(grapePhen);
    }

    /**
     * 修改物候期信息
     * 
     * @param grapePhen 物候期信息
     * @return 结果
     */
    @Override
    public int updateGrapePhen(GrapePhen grapePhen)
    {
        return grapePhenMapper.updateGrapePhen(grapePhen);
    }

    /**
     * 批量删除物候期信息
     * 
     * @param phenIds 需要删除的物候期信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapePhenByPhenIds(Long[] phenIds)
    {
        return grapePhenMapper.deleteGrapePhenByPhenIds(phenIds);
    }

    /**
     * 删除物候期信息信息
     * 
     * @param phenId 物候期信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapePhenByPhenId(Long phenId)
    {
        return grapePhenMapper.deleteGrapePhenByPhenId(phenId);
    }
}
